<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="${staticServer}/inc/style/main.css"/>
    <link rel="stylesheet" href="${staticServer}/inc/style/page.css"/>
    <link rel="stylesheet" href="${staticServer}/css/work_today.css"/>
    <link rel="stylesheet" href="${staticServer}/css/consultant_client_tracking.css"/>
    <script src="${staticServer}/inc/js/jquery.js"></script>
    <script src="${staticServer}/inc/js/pageset.js"></script>
    <script src="${staticServer}/inc/js/submitter.js"></script>
    <script src="${staticServer}/inc/js/tips.js"></script>
    <script src="${staticServer}/js/web/consultant_client_tracking_list.js?1.0"></script>

    <link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css"/>
    <script src="${staticServer}/inc/js/datepicker.js"></script>
    <script>
        var contextPath = '${contextPath}';

        $(function () {
            $("#audit_status").val(${auditStatus});
            $("#center").val("${center}");
        });

        function submit() {
            var center = $("#center").val();
            var auditStatus = $("#audit_status option:selected").val();
            window.location.href = "${contextPath}/goods/ShGoods.htm?center=" + center + "&auditStatus=" + auditStatus;
        }
        function add() {
            window.location.href = "${contextPath}/goods/addGoods.htm";
        }
        function viewProcess(id, apply_status) {
            window.location.href = "${contextPath}/goods/viewProcess.htm?id=" + id + "&apply_status=" + apply_status;
        }
        function audit(id, status) {
            window.location.href = "${contextPath}/goods/auditGoods.htm?id=" + id + "&status=" + status;
        }
    </script>

</head>

<body>
<input type="hidden" id="traId" value="">
<div id="home_link">
    <ul>
        <li></li>
        <li>&gt;</li>
        <li>采购管理</li>
        <li>&gt;</li>
        <li class="current">物品审核</li>
    </ul>
</div>
<div id="container">
    <div id="title">物品审核</div>
    <table class="simple_table" rel="nohover" style="min-width: 750px;">
        <tr>
            <td>
            <label for="phone">中心地址：</label>
            <select id="center">
                <option value="">全部</option>
                <#if offList??>
                <#list offList as list>
                    <option value="${list.name}">${list.name}</option>
                </#list>
                </#if>
            </td><!--
            <td>
            <label>物品类型：</label>
                <select id="good_mnus">
                <#if Mnuslist??>
                    <#list Mnuslist as list>
                        <option value="${list.id}">${list.name}</option>
                    </#list>
                </#if>
                </select>
                
                 <select id="pratin">
                        <option value="">请选择</option>
                </select>
            </td> -->   
            <td>	
            <label>审核状态：</label>
                <select id="audit_status">
                    <option value="">全部</option>
                    <option value="1">未审核</option>
                    <option value="2">审核已通过</option>
                </select>
            </td>   
            <td rowspan="4">
                <input type="button" value=" 查 询 " onclick="submit()"/>
 <!--             <input type="button" value=" 申 请 " onclick="add()"/>-->  
                </td>   
        </tr>
    </table>
    <table>

        <tr class="fields">
            <th width="150">办公地址</th>
            <th width="100">物品分类</th>
            <th width="100">物品名称</th>
            <th width="100">物品类型</th>
            <th width="100">状态</th>
            <th width="100">申请备注</th>
            <th width="100">审核备注</th>
            <th width="100">操作</th>
        </tr>
    <#if list??>
        <#list list as list>
            <tr class="even_row">
                <td align="center">${list.center_name}</td>
                <td align="center">${list.goods_name}</td>
                <td align="center">${list.item_name}</td>
                <td align="center">
                    <#if  list.type=="1">
                        	固定资产
                    <#elseif  list.type=="2">
                        	消耗品
                    </#if>

                </td>
                <td align="center">
                    <#if list.apply_status=="1">
                   			       未审核
                    <#elseif list.apply_status=="2">
                      		     审核通过
                    </#if>
                </td>
                <td align="center"> 
                	<a title="${list.msg}">
                        <em class="caption"></em>
                        <#if list.msg?length gt 6>${list.msg?substring(0,5)}...<#else>${list.msg}</#if>
                    </a>
                </td>
               	<td align="center">
               		<a title="${list.sh_msg}">
                        <em class="caption"></em>
                        <#if list.sh_msg?length gt 6>${list.sh_msg?substring(0,5)}...<#else>${list.sh_msg}</#if>
                    </a>
               </td>
                <td align="center">
                <#if list.apply_status=="1">
                	<a href="javascript:void(0)" onclick="audit('${list.id}','${list.apply_status}')">审核</a>
                <#else>
                	<a href="${contextPath}/goods/auditGoods.htm?id=${list.id}">查看</a>
                </#if>
                
                </td>
            </tr>
        </#list>
    </#if>

    </table>
</div>

<div id="pager">
    <ul id="pagination" style="padding-left: 14px">
    <#if page??>
        <#if page.pagetotal?? && page.pagetotal!="0">
            <#assign pagetotal = page.pagetotal>
        <#else>
            <#assign pagetotal = 1>
        </#if>
        <#if page.currpage??>
            <#assign currpage = page.currpage>
        <#else>
            <#assign currpage = 1>
        </#if>
        <#if currpage==1 >
            <li class="previous-off">首页</li>
            <li class="previous-off">上一页</li>
        <#else>
            <li class="previous"><a
                    href="${contextPath}/goods/goodsAudit.htm?&good_name_id=${good_name_id}&auditStatus=${auditStatus}&currPage=1">首页</a>
            </li>
            <li class="previous"><a
                    href="${contextPath}/goods/goodsAudit.htm?&good_name_id=${good_name_id}&auditStatus=${auditStatus}&currPage=${currpage-1}">上一页</a>
            </li>
        </#if>
        <input type="hidden" id="total" value="${page.pagetotal}"/>
        <#if pagetotal<=11>
            <#list 1..pagetotal as index_up>
                <#if currpage==index_up >
                    <li class="current">${index_up}</li>
                <#else>
                    <li>
                        <a href="${contextPath}/goods/goodsAudit.htm?&good_name_id=${good_name_id}&auditStatus=${auditStatus}&currPage=${index_up}">${index_up}</a>
                    </li>
                </#if>
            </#list>
        <#else>
            <#if currpage<=8 >
                <#list 1..9 as index_up>
                    <#if currpage==index_up >
                        <li class="current">${index_up}</li>
                    <#else>
                        <li>
                            <a href="${contextPath}/goods/goodsAudit.htm?&good_name_id=${good_name_id}&auditStatus=${auditStatus}&currPage=${index_up}">${index_up}</a>
                        </li>
                    </#if>
                </#list>
                <li>...</li>
                <li>
                    <a href="${contextPath}/goods/goodsAudit.htm?&good_name_id=${good_name_id}&auditStatus=${auditStatus}&currPage=${pagetotal}">${pagetotal}</a>
                </li>

            <#elseif (currpage>= 9 && currpage<pagetotal-7)  >
                <li>
                    <a href="${contextPath}/goods/goodsAudit.htm?&good_name_id=${good_name_id}&auditStatus=${auditStatus}&currPage=1">1</a>
                </li>
                <li>...</li>
                <#list currpage-3..currpage+3 as index_up>
                    <#if currpage==index_up >
                        <li class="current">${index_up}</li>
                    <#else>
                        <li>
                            <a href="${contextPath}/goods/goodsAudit.htm?&good_name_id=${good_name_id}&auditStatus=${auditStatus}&currPage=${index_up}">${index_up}</a>
                        </li>
                    </#if>
                </#list>
                <li>...</li>
                <li>
                    <a href="${contextPath}/goods/goodsAudit.htm?&good_name_id=${good_name_id}&auditStatus=${auditStatus}&currPage=${pagetotal}">${pagetotal}</a>
                </li>
            <#else>
                <li>
                    <a href="${contextPath}/goods/goodsAudit.htm?currPage=1&good_name_id=${good_name_id}&auditStatus=${auditStatus}">1</a>
                </li>
                <li>...</li>
                <#list pagetotal-8..pagetotal as index_up>
                    <#if currpage==index_up >
                        <li class="current">${index_up}</li>
                    <#else>
                        <li>
                            <a href="${contextPath}/goods/goodsAudit.htm?&good_name_id=${good_name_id}&auditStatus=${auditStatus}&currPage=${index_up}">${index_up}</a>
                        </li>
                    </#if>
                </#list>
            </#if>
        </#if>
        <#if currpage==pagetotal >
            <li class="previous-off">下一页</li>
            <li class="previous-off">尾页</li>
        <#else>
            <li class="previous"><a
                    href="${contextPath}/goods/goodsAudit.htm?&good_name_id=${good_name_id}&auditStatus=${auditStatus}&currPage=${currpage+1}">下一页</a>
            </li>
            <li class="previous"><a
                    href="${contextPath}/goods/goodsAudit.htm?&good_name_id=${good_name_id}&auditStatus=${auditStatus}&currPage=${page.pagetotal}">尾页</a>
            </li>
        </#if>
        <li class="previous"></li>
        <li class="pageinfo">共${page.total}条记录</li>
    </#if>
    </ul>
</div>

<div class="emptyline"></div>
</body>
</html>